//
//  YJBaseTableVC.m
//  YJB
//
//  Created by 韦朝宾 on 16/6/3.
//  Copyright © 2016年 YJB. All rights reserved.
//

#import "YJBaseTableVC.h"

@interface YJBaseTableVC ()

@end

@implementation YJBaseTableVC

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor =[UIColor whiteColor];
    self.navigationController.navigationBar.translucent = NO;
    //背景图片
    self.navigationController.navigationBar.barTintColor = NAVBACKGROUNDCOLOR;
    //所有文字颜色
    self.navigationController.navigationBar.tintColor = NAVTITLECOLOR;
    //标题颜色
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:navFontSize],NSForegroundColorAttributeName:NAVTITLECOLOR}];
        //返回按钮
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithTarget:self action:@selector(backItemClick) image:@"back_black" highImage:nil title:nil];
}

//代码创建调用
- (instancetype)init
{
    self = [super init];
    if (self)
    {
        self.hidesBottomBarWhenPushed = YES;
    }
    return self;
}
//SB创建调用
- (instancetype)initWithCoder:(NSCoder *)coder
{
    self = [super initWithCoder:coder];
    if (self)
    {
        self.hidesBottomBarWhenPushed = YES;
    }
    return self;
}

- (void)backItemClick
{
    [self.navigationController popViewControllerAnimated:YES];
}

//状态栏颜色
- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleDefault;
}

- (UIBarButtonItem *)customBackItemWithTarget:(id)target
                                       action:(SEL)action
{
    return nil;
}

-(void)dealloc
{
    MyLog(@" ========= 当前表格控制器被销毁");
}

@end
